home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / Definition File Examples / monster_slimy_lobber.def next >
Text File  |  2005-11-14  |  4KB  |  112 lines

  1. //------------------------------------------------
  2. // SDK Example Content
  3. // Slimy Lobber
  4. //
  5. // Compare the entries in this def file to those of the monster_slimy_transfer
  6. // (def/ai/monster_slimy_transfer.def) as an example of how to implement new 
  7. // monsters and monster attacks using only existing AI code.
  8. //
  9. //                                aweldon Nov 05
  10. //------------------------------------------------
  11.  
  12.  
  13.  
  14. model model_monster_slimy_lobber
  15. {
  16.     inherit                 model_monster_slimy_transfer // Use Slimy Transfer mesh and anims as base.
  17.     
  18.     // Lobbing anim    -----------------------------------------------------------------------------------------
  19.     anim lob            models/monsters/slimy_transfer/attack01.md5anim        // Use existing melee anim
  20.     {
  21.         frame    1,13,27,36,57                sound        snd_flesh     // Use pre-existing sounds
  22.         frame     19        ai_attack        melee        r_wrist     // Throw at appropriate frame
  23.         frame     19         fx            fx_lob        r_wrist
  24.     }
  25. }
  26.  
  27. entityDef damage_lobber_grenade
  28. {
  29.     // These values are copied from the monster_gunner .def file and seem to work ok.
  30.     "inherit"                    "damage_monster_base"
  31.     "knockback"                    "0"
  32.     "damage"                    "60"
  33.     "push"                        "10000"
  34.     
  35.     "tv_scale"                    "0.7"
  36.     "tv_time"                    "4200"
  37. }
  38.  
  39. entityDef damage_lobber_grenade_splash
  40. {
  41.     // These values are copied from the monster_gunner .def file and seem to work ok.
  42.     "inherit"                    "damage_monster_base"
  43.     "knockback"                    "0"
  44.     "damage"                    "80"
  45.     "radius"                    "200"
  46.     "push"                        "10000"
  47.  
  48.     "tv_scale"                    "0.7"
  49.     "tv_time"                    "4200"
  50. }
  51.  
  52.  
  53. entityDef projectile_lobber_bit
  54. {
  55.     "inherit"        "projectile_gunner_grenade"    // inherit defaults from the Gunner grenade
  56.     
  57.     "fuse"            "3" //shorten the fuse
  58.     
  59.     "detonate_on_actor"            "1"        // Explode when hitting directly
  60.     
  61.     "model"            "models/gibs/head_pork.lwo"    // New 'grenade' model (brraaaaaaainnnnns...)
  62.     "fx_fly"        "effects/impact/impact_flesh.fx" // When flying, play the impact effect. Admittedly not the best effect for this purpose.
  63.     "fx_detonate"        "effects/monsters/gib.fx"    // Use the splatty gib effect for 'explosions'
  64.     "fx_impact"        "effects/monsters/gib.fx"    // Use the splatty gib effect for 'explosions'
  65.     
  66.     "def_splash_damage"    "damage_lobber_grenade_splash"    // Use damage def specified above
  67.     "def_damage"        "damage_lobber_grenade"        // Use damage def specified above
  68.     
  69.     "speed"            "500"        // Adjust speed
  70.     "angular_velocity"    "0 -900 200"    // Give a nudge up and towards center.            
  71.  
  72.     "bounce"        "15"    // Make with the bouncing
  73.  
  74.     "contact_friction"    "1"    // Reduced friction for better bounce behavior
  75.  
  76.     "delay_splash"        "0"    // Splash damage effects are instantaneous
  77.  
  78.     "snd_ricochet"        "failedtransfer_flesh"        // Fleshy sound on bounce
  79. }
  80.  
  81. // New EntityDef
  82. entityDef monster_slimy_lobber
  83. {
  84.     "inherit"        "monster_slimy_transfer"    // Inherit from the Slimy Transfer
  85.     
  86.     // --------------------------------- Actions ------------------------------------
  87.     "action_meleeAttack"            "1"     // Leave this enabled, we'll replace it with our lobbing attack
  88.     "action_meleeAttack_anim"        "lob"    // 'New' anim on melee attack
  89.  
  90.     "action_meleeAttack_minrange"        "80"     // Minimum distance (in units) for attack.
  91.     "action_meleeAttack_maxrange"        "512"    // Maximum distance (in units) for attack.
  92.     "action_meleeAttack_blendFrames"    "6"    // Blend frames on attack
  93.     "action_meleeAttack_rate"        ".5"    // Rate of attack
  94.     
  95.     "action_vomitAttack"            "1"    // Keep the vomit attack enabled
  96.     "action_vomitAttack_minrange"        "0"    // Minimum distance (in units) for attack.
  97.     "action_vomitAttack_maxrange"        "128"    // Maximum distance (in units) for attack.
  98.     
  99.         
  100.     // --------------------------------- Body ------------------------------------
  101.     "model"                "model_monster_slimy_lobber"    // Use our new ModelDef from above
  102.     
  103.  
  104.     // --------------------------------- Combat ----------------------------------
  105.     "health"        "75"    // Beef these guys up a bit
  106.     "painThreshold"        "40"    // Can take more damage before playing pain anims
  107.  
  108.     "def_attack_melee"    "projectile_lobber_bit"        // Change melee attack to our new projectile
  109.  
  110.     "fx_lob"        "effects/impact/impact_flesh.fx"    // Effect to play when lobbing (added on frame commands above)
  111. }
  112.